
<%@ page import="sistema.Venda" %>
<!doctype html>
<html>
  <head>
    <meta name="layout" content="main">
  <g:set var="entityName" value="${message(code: 'venda.label', default: 'Venda')}" />
  <title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
  <a href="#list-venda" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
  <div class="nav" role="navigation">
    <ul>
      <li><g:link class="home" controller="admin" action="index">Home</g:link></li>
      <li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
    </ul>
  </div>
  <div id="list-venda" class="content scaffold-list" role="main">
    <h1><g:message code="default.list.label" args="[entityName]" /></h1>
    <g:if test="${flash.message}">
      <div class="message" role="status">${flash.message}</div>
    </g:if>
     <div id="searchbox">
      <p style="font-size: 9px; font-style: italic; margin-left: 20px">Pesquisa (Nome Vendedor)</p>
      <g:remoteField  name="search" 
                      style="padding:4px;margin-left: 20px"
                      id="search"
                      size="40" 
                      paramName="filtroVenda" 
                      update="listVenda" 
                      url="[controller:'Venda', action:'filtroVenda']">
      </g:remoteField>  
    </div>
    <div id="listVenda">
      <table id="newspaper-a">
        <thead>
          <tr>
            <th><g:message code="venda.id.label" default="Numero" /></th>
        <th><g:message code="venda.vendedor.label" default="Vendedor" /></th>
        <g:sortableColumn property="dateCreated" title="Data" />
        <th>Valor Venda</th>
        </tr>
        </thead>
        <tbody>
        <g:each in="${vendaInstanceList}" status="i" var="vendaInstance">
          <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">

            <td><g:link action="show" id="${vendaInstance?.id}">${fieldValue(bean: vendaInstance, field: "id")}</g:link></td>
          <td>${fieldValue(bean: vendaInstance, field: "vendedor")}</td>
          <td><g:formatDate format="dd/MM/yyyy" date="${vendaInstance?.dateCreated}" /></td>
          <td><g:moeda valor="${vendaInstance?.valorTotal}" /></td>

          </tr>
        </g:each>
        </tbody>
      </table>
      <div class="pagination">
        <g:paginate total="${vendaInstanceTotal}" />
      </div>
    </div>
  </div>
</body>
</html>
